﻿using ProtoBuf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZyGames.Framework.Model;

namespace ZyGames.DZPocker.Model
{
	/// <summary>
	/// 桌子上的牌
	/// </summary>
	[Serializable, ProtoContract]
	[EntityTable(CacheType.Entity, DbConfig.Data, IsExpired = false)]
	public class SharedGameTableCards : ShareEntity
	{
		public SharedGameTableCards()
			: base(false)
		{
		}

		public SharedGameTableCards(SharedGameTableCards tableCards)
		{
			this.TableID = tableCards.TableID;
			this.Hand = tableCards.Hand;
			this.Card0 = tableCards.Card0;
			this.Card1 = tableCards.Card1;
			this.Card2 = tableCards.Card2;
			this.Card3 = tableCards.Card3;
			this.Card4 = tableCards.Card4;
		}
		public SharedGameTableCards(int tableId, int hand, int card0, int card1, int card2, int card3, int card4)
			: this()
		{
			this.TableID = tableId;
			this.Hand = hand;
			this.Card0 = card0;
			this.Card1 = card1;
			this.Card2 = card2;
			this.Card3 = card3;
			this.Card4 = card4;
		}

		/// <summary>
		/// 桌子的逻辑Id
		/// </summary>        
		[ProtoMember(1)]
		[EntityField(true)]
		public int TableID { get; set; }

		/// <summary>
		/// 第几手牌
		/// </summary>        
		[ProtoMember(2)]
		[EntityField(true)]
		public int Hand { get; set; }

		/// <summary>
		/// 手牌0
		/// </summary>        
		[ProtoMember(3)]
		[EntityField]
		public int Card0 { get; set; }

		[ProtoMember(4)]
		[EntityField]
		public int Card1 { get; set; }

		[ProtoMember(5)]
		[EntityField]
		public int Card2 { get; set; }

		[ProtoMember(6)]
		[EntityField]
		public int Card3 { get; set; }


		[ProtoMember(7)]
		[EntityField]
		public int Card4 { get; set; }
	}
}
